home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / net / AmiComSys.lha / AmiComSys / rexx / AmiComSystest.rexx next >
Encoding:
OS/2 REXX Batch file  |  1997-08-18  |  1.1 KB  |  40 lines

  1. /* ARexx script example for AmiComSys */
  2. /* Outputs every variable */
  3.  
  4. ADDRESS AMICOMSYS;
  5. OPTIONS RESULTS;
  6.  
  7. GET stem info. CLIENTLIST;
  8. /* "stem info." inserts the results to the structure 'info.'. */
  9. /* "var s" would have inserted all the results to one string in s. */
  10. /* "CLIENTLIST": We want to read the client list information. */
  11.  
  12. SAY ""
  13. SAY "Connected (0 = no, 1 = yes):" info.connected;
  14.  
  15. /* Only output the client info when we are connected to server */
  16. IF info.connected=1 THEN DO
  17.     SAY "Number of clients:" info.numclients;
  18.     SAY "Selected client:" info.selected;
  19.     SAY "Local user:";
  20.     Say info.realname ' ('||info.login||') online' info.onlinetime;
  21.     Say 'Email:' info.email;
  22.     Say 'Homepage:' info.homepage;
  23.     Say 'FTPSite:' info.ftpsite;
  24.     Say 'Comment:' info.comment;
  25.  
  26.     /* Outputs the whole list of client info */
  27.     DO i=0 FOR info.numclients 
  28.         SAY "----" i+1 "-----";
  29.         SAY "Host:" info.hostnames.i;
  30.         SAY "Username:" info.usernames.i;
  31.         SAY "Realname:" info.realnames.i;
  32.         SAY "Comment:" info.comments.i;
  33.         SAY "HomePage:" info.homepages.i;
  34.         SAY "FTPSite:" info.ftpsites.i;
  35.         Say 'Online:' info.onlinetimes.i;
  36.     END;
  37. END;
  38.  
  39. EXIT;
  40.